package cn.iocoder.yudao.module.resource.dal.mysql.category;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.resource.dal.dataobject.category.ResourceCategoryDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 资源分类 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface ResourceCategoryMapper extends BaseMapperX<ResourceCategoryDO> {

    default List<ResourceCategoryDO> selectListByParentId(Long parentId) {
        return selectList(ResourceCategoryDO::getParentId, parentId);
    }

    default List<ResourceCategoryDO> selectListByStatus(Integer status) {
        return selectList(ResourceCategoryDO::getStatus, status);
    }

}
